
// Source File Name:   ActFactory.java

package com.sunwayhorizo.health.hl7.factories;
import com.sunwayhorizo.health.hl7.common.*;
import com.sunwayhorizo.health.hl7.datatypes.*;
import com.sunwayhorizo.health.hl7.rim.*;

// Referenced classes of package oracle.apps.ctb.hl7.factories:
//            DataTypeFactory, ReferenceModifier

public abstract class ActFactory
{

    public static final String RCS_ID = "$Header: ActFactory.java 1.0 2006/02/27 04:04:24 atomlins noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: ActFactory.java 1.0 2006/02/27 04:04:24 atomlins noship $", "com.sunwayhorizo.health.facade.factories");
//    protected RimServiceBean session;
//    protected FactoryValidation validation;
    protected DataTypeFactory dataTypeFactory;
    private static final String PARAMETER_KEY = "PARAM1";
    private static final String CAUSE_KEY = "CAUSE";
    private static final String NESTED_CODE = "HTB____";
    private static final String PARAMETER_MISSING_CODE = "CTB_NULL_PARAMETER";
    private static final String PARAMETER_MISSING_MESSAGE = "Invalid parameter was passed into this API. Required parameter [&PARAM1] was null.";
    private static final String NESTED_MESSAGE = "An error occurred while creating an instance of ActFactory: &CAUSE";

    public static synchronized ActFactory getInstance()
    {
        return new ActFactoryImpl();
    }

//    public static synchronized ActFactory getInstance(ServiceLocator servicelocator)
//    {
//        if(servicelocator == null)
//            throw newNullException("sl");
//        ActFactoryImpl actfactoryimpl;
//        try
//        {
//            actfactoryimpl = new ActFactoryImpl(servicelocator);
//        }
//        catch(Hl7Exception ctbexception)
//        {
//            throw newNestedException(ctbexception);
//        }
//        return actfactoryimpl;
//    }

    public abstract Act newAct(CS cs, CS cs1, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract ControlAct newControlActEvent(CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newRegistryAct(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract PatientEncounter newPatientEncounter(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newObservation(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newComposition(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Document newDocument(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract SubstanceAdministration newSubstanceAdministration(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Document newClinicalDocument(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Document newCDAL1Document(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newEntry(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newBattery(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newCluster(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newExtract(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newElectronicHealthRecord(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newFolder(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newOrganizer(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newCategory(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newDocumentBody(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newDocumentSection(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newTopic(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newAccommodation(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Account newAccount(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newAccession(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newAdjudication(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract ControlAct newAction(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract ControlAct newInformation(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract ControlAct newStateTransitionControl(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newContract(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract FinancialContract newFinancialContract(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract FinancialContract newCoverage(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newConsent(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract DeviceTask newContainerRegistration(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newClinicalTrialTimepointEvent(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newIncident(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newInform(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract InvoiceElement newInvoiceElement(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract WorkingList newWorkingList(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newBoundedROI(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newOverlayROI(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newDetectedIssue(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract PublicHealthCase newPublicHealthCase(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract PublicHealthCase newOutbreak(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newClinicalTrial(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newConditionNode(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newCondition(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract DiagnosticImage newDiagnosticImage(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newInvestigation(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newMonitoringProgram(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newObservationSeries(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newCorrelatedObservationSequences(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Observation newSpecimenObservation(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newPatientCareProvision(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Procedure newProcedure(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newSpecimenTreatment(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Supply newSupply(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Diet newDiet(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act newTransportation(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract FinancialTransaction newFinancialTransaction(CS cs, CD cd, SET_II set_ii)
        throws Hl7Exception;

    public abstract Act makeReference(ReferenceModifier referencemodifier, CS cs, CS cs1, CD cd, SET_II set_ii, int i)
        throws Hl7Exception;

/*    public abstract QueryAct newQueryAct(CoreFetch corefetch)
        throws Hl7Exception;
*/
    
    public abstract ActParticipation newActParticipation()throws Hl7Exception;
    
    public abstract ActRelationship newActRelationship()throws Hl7Exception;
    
    @SuppressWarnings("unused")
	private static RuntimeException newNullException(String s)
    {
        String as[] = {
            "PARAM1"
        };
        String as1[] = {
            s
        };
        String s1 = MessageUtils.getMessage("Invalid parameter was passed into this API. Required parameter [&PARAM1] was null.", as, as1);
        return new NullPointerException(s1);
    }

    @SuppressWarnings("unused")
	private static RuntimeException newNestedException(Hl7Exception ctbexception)
    {
        String as[] = {
            "CAUSE"
        };
        String as1[] = {
            ctbexception.getMessage()
        };
        String s = MessageUtils.getMessage("An error occurred while creating an instance of ActFactory: &CAUSE", as, as1);
        return new RuntimeException(s);
    }

    public ActFactory()
    {
    }

	protected DataTypeFactory getDataTypeFactory() {
		return dataTypeFactory;
	}

	protected void setDataTypeFactory(DataTypeFactory dataTypeFactory) {
		this.dataTypeFactory = dataTypeFactory;
	}

	protected static String getRcsId() {
		return RCS_ID;
	}

	protected static boolean isRcsIdRecorded() {
		return RCS_ID_RECORDED;
	}

	protected static String getParameterKey() {
		return PARAMETER_KEY;
	}

	protected static String getCauseKey() {
		return CAUSE_KEY;
	}

	protected static String getNestedCode() {
		return NESTED_CODE;
	}

	protected static String getParameterMissingCode() {
		return PARAMETER_MISSING_CODE;
	}

	protected static String getParameterMissingMessage() {
		return PARAMETER_MISSING_MESSAGE;
	}

	protected static String getNestedMessage() {
		return NESTED_MESSAGE;
	}

}
